import { httpInstance } from '@/utils/request'

interface FetchProjectPaymentListAPIResData {
  code: number
  data: Payment[]
  msg: string
  time: string
}

export function fetchProjectPaymentListAPI(
  projectId: string | undefined,
  token: string,
) {
  return httpInstance.get<FetchProjectPaymentListAPIResData>(
    'api/Project_extend/projectPayList',
    projectId
      ? { params: { project_id: projectId }, headers: { token } }
      : { headers: { token } },
  )
}
